Table of Contents
- Theme Installation
- Members / Subscriptions
- Dark Mode
- Navigation
- Search
- Tags Page
- Contact Page
- Comments
- Home Page Posts by Tag
- Posts Per Page
- Related Posts
- Publication icon
- Responsive Tables
- Social Sharing Icons
- Footer Social Media Icons
- Languages
- Syntax Highlighting
- Theme Deploy with GitHub Actions
- Code Injection
- Customize Logo Size
- Footer Copyright
- Zip Theme Files
Theme Installation
To begin, unzip the downloaded package by double-clicking it on a Mac or by right-clicking and selecting “Extract All” on Windows.
Inside the new sinai folder, you will find the sinai.zip theme file and an online documentation file.
Follow these steps to upload the theme to your website:
- Log in to your Ghost website admin (example.com/ghost).
- Click the settings icon ( ) at the bottom of the left-hand side.
- Go to Site > Design & branding.
- Click Customize > Change theme.
- Click Upload theme and select the sinai.zip theme file.
- Once uploaded, click Activate now to activate Sinai.
Members / Subscriptions
Sinai has different interface elements for membership features.
- Login In and Subscribe buttons in the header
- Footer subscription form
- If the post is set to Members Only, a Call to Action section on the Post page to encourage visitors to subscribe
Remove Membership Components from the Theme
If you want to disable membership from your website, you can do the following from the website admin. After doing this, all the theme/website membership elements like header links and forms will be removed.
- Go to your Ghost admin Settings > Membership > Access > Subscription access
- Select Nobody
- Click Save
Remove ‘Log In’ and ‘Subscribe’ from Header
Add the following CSS code into the Ghost admin Code Injection Site Header.
<style>
.c-header .is-membership { display: none; }
</style>
Click Save. That’s all.
This will also remove the Account link, visible if logged in.
Remove Ghost Portal / The Bottom Right Button
This is the Ghost Portal button; you can disable it from the Ghost admin. More information at Portal Look and feel.
Membership Troubleshooting Tips
If for any reason the subscribe form does not work, or there is an error message, the following tips might help:
First, ensure you run the latest version of Ghost.
If you are self-hosting your website, make sure to set up the mail config. After doing that, restart your Ghost server.
The website config URL should match the URL used to access the website, as described in the Ghost docs.
Enter the URL you use to access your publication. If using a subpath, enter the full path, https://example.com/blog/
. If using SSL, always enter the URL with https://
..
If you still have an issue using Ghost Pro, please get in touch with the Ghost team. If you use any self-hosting provider, please get in touch with them for help.
There is nothing to do from the theme side. Also, you can try the original theme demo to double-check that everything is working fine.
For more information about Members, connecting Stripe, and setting the package price, check the official Ghost documentation.
Dark Mode
To enable the dark mode version, open the default.hbs
theme file using a code editor and change line 10 to be {{> compiled/inline-css-dark }}
instead of {{> compiled/inline-css }}
as:
Save the file and upload the theme to your Ghost blog.
Navigation
You can add, edit, delete, and reorder the navigation menu in Ghost Admin from the Settings > Site > Navigation > Primary.
To include a static page on your navigation menu, follow these steps.
First, type the page’s name in the label field as you’d like it to appear on your menu.
Next, click on the item’s URL. The blog URL will already be auto-populated. Add the page slug after the final /. When satisfied with your page configurations, click the Save button.
Secondary Navigation / Footer
Like Header Navigation, you can add the footer navigation links from the Ghost admin Settings > Site > Navigation > Secondary.
Search
Sinai uses the Ghost Native Search.
To remove search:
- Go to your Ghost admin Settings > Design > Site design > Site-wide
- Toggle the Show search option off
- Click Save
Tags Page
The Tags page will automatically pull all your website tags.
Follow these steps to create the Tags page:
- From the Ghost admin Pages section, create a new page and give it a title, like “Tags”.
- From Page settings, select the Tags template.
- Click Publish to publish the page.
- To add the page to the navigation, please check the Navigation section.
Note for Self-hosters
If you are self-hosting your website, you may need to do a server restart. This should get the Tags option to show up in the Template dropdown.
Contact Page
To create the Contact page:
- Create a new Page and give it a title, like “Contact”.
- Add your content and the contact form code using Formspree as a service. Please check the code example below.
- Click Publish to publish the page.
- To add the page to the navigation, please check the Navigation section.
<form action="https://formspree.io/your@email.com" method="POST">
<input type="text" name="name" placeholder="Name">
<input type="email" name="_replyto" placeholder="Email">
<textarea name='message' placeholder="Message"></textarea>
<input class='c-btn' type="submit" value="Send">
</form>
For more information, check out How to Add a Contact Form to Your Ghost Blog.
Comments
The theme comes with Ghost Native Comments integration. You can turn the comments on from your Ghost admin Settings > Membership > Commenting.
Learn more about Ghost comments.
Ghost developer documentation for comments.
The theme file for Ghost comments partials/comments/ghost.hbs
.
Home Page Posts by Tag
You can add many tag sections to the homepage; each section will show the recent four posts by the tag. To set this up:
- Go to the Ghost admin Settings > Design & branding > Homepage
- In the Tag slugs for home sections input, add all the Tags Slug you want to include separated by (,). No spaces between commas.
To get the Tag Slug, you can find it on each Tag page from the admin.
You might end up with the Slugs as:
politics,covid,technology
× No spaces between commas.
Posts Per Page
You can control how many posts to display per page from the theme package.json
file. Open that file using a code editor and change the posts_per_page
value from 12 to a number.
"config": {
"posts_per_page": 12
}
The theme default value is set to 12
posts per page.
Once you finish, zip the theme files, and upload the final zip file to your Ghost website.
Related Posts
Related posts section will be visible at the bottom of a post if other posts share the same tags as the current post.
Publication icon
You can change the favicon from the Ghost admin Settings > Design & branding > Brand > Publication icon.
Responsive Tables
Responsive tables are required and essential for adding tabular content and allowing tables to be scrolled horizontally. You can make any table responsive across all viewports by wrapping a table
with .responsive-table
, for example:
<div class='responsive-table'>
<table>
...
</table>
</div>
Social Sharing Icons
You can customize and update a post’s social media sharing icons from the partials/share.hbs
theme file.
Footer Social Media Icons
Footer social media links are placed in the partials/social-icons.hbs
file.
Ghost supports adding Facebook and Twitter profile URLs from the admin panel. Go to Settings > General > Social accounts and add your URLs. This will update Facebook and Twitter URLs within the footer social media section.
Sinai supports adding Instagram, YouTube, and Pinterest URLs. Go to Settings > Design > Site-wide.
Add New Social Links
If you want to add new social media links not available in the theme or Ghost settings shown above, you can do that in the partials/social-icons.hbs
file. You will find the icon’s code that comes with the theme in the Available Social Media Icons section.
For example, to add a new social line for Instagram, your code will be like:
<li class='c-social-icons__item'>
<a href='#' aria-label='Instagram' target='_blank' rel='noopener'>
<span class='c-social-icons__icon' data-icon='ei-sc-instagram' data-size='s'></span>
</a>
</li>
The code above contains the ICON code from the above list and the social media link (a
) within a list element (li
).
Next, replace your Instagram full URL with the link href
value. If your Instagram URL is:
https://www.instagram.com/ghost/
Then the new code will be:
<li class='c-social-icons__item'>
<a href='https://www.instagram.com/ghost/' aria-label='Instagram' target='_blank' rel='noopener'>
<span class='c-social-icons__icon' data-icon='ei-sc-instagram' data-size='s'></span>
</a>
</li>
Once you finish, zip the theme files, and upload the final zip file to your Ghost website.
Available Social Media Icons
The theme uses Evil Icons to provide simple and clean icons for other social accounts. Here you can find a list of the social media icons to use:
<span data-icon='ei-sc-facebook' data-size='s'></span>
GitHub
<span data-icon='ei-sc-github' data-size='s'></span>
<span data-icon='ei-sc-instagram' data-size='s'></span>
<span data-icon='ei-sc-linkedin' data-size='s'></span>
Odnoklassniki
<span data-icon='ei-sc-odnoklassniki' data-size='s'></span>
<span data-icon='ei-sc-pinterest' data-size='s'></span>
Skype
<span data-icon='ei-sc-skype' data-size='s'></span>
SoundCloud
<span data-icon='ei-sc-soundcloud' data-size='s'></span>
Telegram
<span data-icon='ei-sc-telegram' data-size='s'></span>
Tumblr
<span data-icon='ei-sc-tumblr' data-size='s'></span>
<span data-icon='ei-sc-twitter' data-size='s'></span>
Vimeo
<span data-icon='ei-sc-vimeo' data-size='s'></span>
VK
<span data-icon='ei-sc-vk' data-size='s'></span>
Youtube
<span data-icon='ei-sc-youtube' data-size='s'></span>
Languages
Sinai ships with many languages already. But if you’d like to add another one, you’ll be able to do that too.
Theme Translation
Sinai supports Ghost i18n and comes with German, Italian, Spanish, French Finnish, Portuguese, Dutch, Turkish and Danish translation.
To use a language other than English, go to your Ghost admin Settings > General > PUBLICATION INFO and enter the ISO Code into the Publication Language field.
The following is a list of the available theme languages with the code to use.
da
for Danishde
for Germanydu
for Dutchen
for Englishes
for Spanishfi
for Finnishfr
for Frenchit
for Italianpt
for Portuguesetr
for Turkish
Add a New Language Translation
If the theme does not have a translation for your language, follow the following steps to add a new language translation.
- Create a new file using a code editor in the theme’s locales folder with the ISO Language Codes code. Foe example, if the new language is Japanese, the ISO code will be
ja
and the file name will beja.json
. - In the same locales folder, open the
en.json
file and copy its content into your new language file. - Start translating, as shown in the following Edit Translation section.
- Go to your Ghost admin Settings > General > PUBLICATION INFO and enter your language ISO code into the Publication Language field. For example,
ja
. - Click Save settings.
Once you finish, zip the theme files, and upload the final zip file to your Ghost website.
You may want to restart Ghost or deactivate and activate the theme again to make the new changes effective.
Edit Translation
To improve or edit a translation in a specific available language, you can open the language file using a code editor in the /locales/
theme folder:
|____locales
| |____da.json
| |____de.json
| |____du.json
| |____en.json
| |____es.json
| |____fi.json
| |____fr.json
| |____it.json
| |____pt.json
| |____tr.json
For example, the German translation file looks like this:
{
"More Posts": "Mehr Artikel",
"Loading": "lade nach ...",
"Page Not Found": "Seite nicht gefunden",
"Recent Posts": "neuste Artikel",
"Home Page": "Startseite",
"Featured Post": "Featured Artikel",
"Share on Twitter": "Auf Twitter teilen",
"Share on Facebook": "Auf Facebook teilen",
"Share on LinkedIn": "Auf LinkedIn teilen",
"Share on Pinterest": "Auf Pinterest teilen",
"Share via Email": "Teilen per E-Mail",
"Copy link": "Link kopieren",
"Link copied to clipboard": "Link in die Zwischenablage kopiert",
"Search": "Suche",
"Search {blogtitle}": "Suche {blogtitle}",
"Type to Search": "Tippe um zu suchen",
"Tags": "Stichworte",
"Navigation": "Navigation",
"Newsletter": "Newsletter",
"Published with {ghostLink} & {themeLink}": "Veröffentlicht mit {ghostLink} & {themeLink}",
"Comments": "Bemerkungen",
"You Might Be Interested In": "Sie könnten daran interessiert sein",
"1 min read": "1 minuten gelesen",
"% min read": "% minuten gelesen",
"Account": "Konto",
"Log In": "Einloggen",
"Log Out": "Ausloggen",
"Continue": "Fortsetzen",
"Subscribe": "Abonnieren",
"Subscribe Now": "Abonniere jetzt",
"Your email": "Deine E-Mail-Adresse",
"Please check your inbox and click the link to complete the login.": "Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um die Anmeldung abzuschließen.",
"Please check your inbox and click the link to confirm your subscription.": "Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um Ihr Abonnement zu bestätigen.",
"Please enter a valid email address!": "Bitte geben Sie eine gültige E-Mail-Adresse ein!",
"An error occurred, please try again later.": "Ein Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.",
"Already have an account?": "Hast du schon ein Konto?",
"Don't have an account yet?": "Sie haben noch keinen Account?",
"This post is for paying subscribers only": "Dieser Beitrag ist nur für zahlende Abonnenten",
"This post is for subscribers only": "Dieser Beitrag ist nur für Abonnenten",
"Join the newsletter to receive the latest updates in your inbox.": "Treten Sie dem Newsletter bei, um die neuesten Updates in Ihrem Posteingang zu erhalten",
"Choose your subscription": "Wählen Sie Ihr Abonnement",
"Unlock full access to {siteTitle} and see the entire library of members-only content & updates.": "Schalte den vollen Zugriff auf {siteTitle} frei und sieh dir die gesamte Bibliothek mit Inhalten und Updates nur für Mitglieder an.",
"Subscribe to {siteTitle}": "Abonnieren bei {siteTitle}",
"Choose this plan": "Wählen Sie diesen Plan",
"Monthly": "Monatlich",
"Yearly": "Jährlich",
"month": "Monat",
"year": "Jahr",
"Welcome back!": "Willkommen zurück!",
"Log Into your account again.": "Melden Sie sich erneut in Ihrem Konto an.",
"Send login link": "Anmeldelink senden",
"Nice, you're a subscriber!": "Schön, dass Sie Abonnent sind!",
"Your subscription will expire on": "Ihr Abonnement läuft am ab",
"Your plan": "Dein Plan",
"Card": "Karte",
"Expires": "Läuft ab",
"Next bill date": "Nächstes Rechnungsdatum",
"Edit billing info": "ERechnungsinformationen bearbeiten",
"You have an active {siteTitle} account with access to all posts.": "Sie haben ein aktives {siteTitle} Konto mit Zugriff auf alle Posts.",
"You're a subscriber to free members updates": "Sie sind Abonnent der kostenlosen Mitgliederaktualisierungen",
"You are subscribed to free updates from {siteTitle}, but don't have a paid subscription to read all the posts.": "Sie haben kostenlose Updates von {siteTitle} abonniert, haben jedoch kein kostenpflichtiges Abonnement, um alle Beiträge zu lesen."
}
Each line consists of a left key ("More Posts"
) and a right value ("Mehr Artikel"
).
The key is plain English that exists in all translation files and should not be changed. You should change only the value.
If you have any suggestions to improve a current translation or add a new language, please contact me.
Portal Text & Translation
There is no way to change or translate the Portal text or other parts of the website like Comments and Search labels. It is also not possible to translate the newsletter emails your subscribers receive. These are core Ghost components and not part of the theme layer; we can’t control them.
I suggest reaching out to the Ghost team ( support@ghost.org ); so they might work on this issue or have a workaround.
Multiple Languages Support
The theme supports Ghost translations for different languages, which means if you set the site language to French, some parts of the theme will change to French, for example, button labels.
On the other hand, having multiple languages on one website is not supported out of the box in Ghost, so the theme is.
Syntax Highlighting
You can add a fenced code block by placing triple backticks ```
before and after the code block. For example:
``` pre { background-color: #f4f4f4; max-width: 100%; overflow: auto; } ```
Will produce the following gray look:
To highlight a code block, add the language alias like css
or js
to the code block. For example, the CSS code in the previous example will wrap between ```css
and ```
as follows:
```css pre { background-color: #f4f4f4; max-width: 100%; overflow: auto; } ```
This will produce the following colored look:
To add inline code, wrap the text between two backticks ` `
.
Prism
The theme ships with Prism.js, a lightweight, robust, and elegant syntax highlighter.
The initial Prism package includes some languages, like Markup, CSS, C-like, and JavaScript.
You can add support for more languages by adding the Prism autoloader
script, which will automatically load the languages you need. T do this, add the following script to the website admin Code Injection (Site Footer).
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha512-fTl/qcO1VgvKtOMApX2PdZzkziyr2stM65GYPLGuYMnuMm1z2JLJG6XVU7C/mR+E7xBUqCivykuhlzfqxXBXbg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Click Save.
Theme Deploy with GitHub Actions
Sinai comes integrated with the Deploy Ghost Theme Github action. The purpose of the GitHub action is to take the theme from the GitHub repo and send it to your website.
I have written about this in How to Deploy Your Ghost Theme Using Github Actions. All you need to do is follow steps 1 and 2.
The Deploy Ghost Theme action is software by Ghost and works with any Ghost install, whether you self-host Ghost or use Ghost Pro.
Code Injection
Another choice for customization is to use the Ghost Code Injection settings in Ghost admin.
For a CSS example, you can use the following code in the Site Header section to change the logo color and font size.
<style>
.c-logo__link {
color: #4550E5;
font-size: 32px;
}
</style>
Watch the following short video about Ghost Code Injection, how it works, and how to use it.
Check out How to use Code Injection Ghost guide for more information.
Customize Logo Size
If you are using an image as a logo (instead of the site name) and want to change the logo size, use the following code in Code Injection.
<style>
.c-logo__img { max-height: 64px; }
</style>
The default value is 64px
, so you can increase this value to match your preference.
If the logo image has a large white space around it, trim that space with a photo editing app before uploading for better results.
Footer Copyright
You can update the footer copyright line information from the theme partials/footer.hbs
file. Open and edit that file using a code editor.
Zip Theme Files
You can compress it as a standard folder like any other folder on your computer. If you are on Mac, right-click on the theme folder to view the context menu. Then, click the Compress option.
Have any questions? Contact Ahmad